var loading;
require(["dojo/_base/declare", "dojo/dom", "dojo/dom-style", "dojo/_base/fx"],
    function (declare, dom, domStyle, fx) {
        var Loading = declare(null, {
            overlayNode: null,
            constructor: function () {
                this.overlayNode = dom.byId("loadingOverlay");
            },
            endLoading: function () {
                fx.fadeOut({
                    node: this.overlayNode,
                    onEnd: function (node) {
                        domStyle.set(node, 'display', 'none');
                    }
                }).play();
            }
        });
        loading = new Loading();
    });
